import { request } from '@/utils/request';
import CRUD from '@/utils/request/CRUD';

// 审批列表CRUD
export const approveListCRUD = CRUD('/bpm/oa-examine');

// 获取我的审批列表
export function getMyApproveList(params: Record<string, any>) {
  return request.get({
    url: '/bpm/oa-examine/my-page',
    params,
  });
}

// 获得指定流程实例的任务列表
export function getProcessInstanceTaskList(params: Record<string, any>) {
  return request.get({
    url: '/bpm/task/list-by-process-instance-id',
    params,
  });
}
// 取消
export function cancelProcessInstance(data: Record<string, any>) {
  return request.delete({
    url: '/bpm/process-instance/cancel-by-start-user',
    data,
  });
}
